#ifndef CPCAPHANDLE_H
#define CPCAPHANDLE_H

#include "pcapauth.h"
#include "pcapdev.h"

class CPCapHandle : public QObject
{
    Q_OBJECT
    Q_PROPERTY(QString source READ source WRITE setSource NOTIFY sourceChanged)
    Q_PROPERTY(QString snaplen READ snaplen WRITE setSnaplen NOTIFY snaplenChanged)
    Q_PROPERTY(QString timeout READ timeout WRITE setTimeout NOTIFY timeoutChanged)
    Q_PROPERTY(CPCapAuth *author READ author WRITE setAuthor NOTIFY authorChanged)
public:
    explicit CPCapHandle(QObject *parent = Q_NULLPTR);
    ~CPCapHandle();

    QString source() const;
    void setSource(const QString &source);

    QString snaplen() const;
    void setSnaplen(const QString &snaplen);

    QString timeout() const;
    void setTimeout(const QString &timeout);

    CPCapAuth *author() const;
    void setAuthor(CPCapAuth *author);

Q_SIGNALS:
    void sourceChanged();
    void snaplenChanged();
    void timeoutChanged();
    void authorChanged();

private:
    QString m_source;
    QString m_snaplen;
    QString m_timeout;
    CPCapAuth *m_author;
};

#endif // CPCAPHANDLE_H
